﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace EWMSWeb.ashx
{
    /// <summary>
    /// Email1 的摘要说明
    /// </summary>
    public class Email1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string key = context.Request["key"];

            string gettype = context.Request["eType"]; ;
            string result = "";
            result = GetJson(key, gettype);
            context.Response.Write(result);
        }

        /// <summary>
        /// 原料理货联系人
        /// </summary>
        /// <param name="key"></param>
        /// <param name="GetType">T理货 I询价 CC抄送</param>
        /// <returns></returns>
        public string GetJson(string key, string GetType)
        {

            DataLib.BLL.PEmail bll = new DataLib.BLL.PEmail();
            return bll.GetJsonPEmail(key, GetType);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}